package Entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "tipo", discriminatorType =DiscriminatorType.STRING)
@Table(name = "Area")
public class Entity_Area implements Serializable{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name = "id_area")
	private int idArea;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_deposito")
	private Entity_DepositoArea depositoArea;
	//private List<Entity_Comanda> comandas;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_empleado")
	private Entity_Encargado encargado;
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_area")
	private List<Entity_PedidoInsumo> pedidoInsumos;
	

	//GET & SET
	public int getIdArea() {
		return idArea;
	}
	
	public Entity_DepositoArea getDepositoArea() {
		return depositoArea;
	}

	public void setDepositoArea(Entity_DepositoArea depositoArea) {
		this.depositoArea = depositoArea;
	}

	public List<Entity_PedidoInsumo> getPedidoInsumos() {
		return pedidoInsumos;
	}

	public void setPedidoInsumos(List<Entity_PedidoInsumo> pedidoInsumos) {
		this.pedidoInsumos = pedidoInsumos;
	}

	public void setIdArea(int idArea) {
		this.idArea = idArea;
	}

	public Entity_Encargado getEncargado() {
		return encargado;
	}
	public void setEncargado(Entity_Encargado encargado) {
		this.encargado = encargado;
	}
}
